Open
Conversation
olleolleolle
reviewed
Sep 3, 2020
|
|
||
| def self.call(template) | ||
| def self.call(template, source=nil) | ||
| source =|| template.source |
There was a problem hiding this comment.
Suggested change
| source =|| template.source | |
| source ||= template.source |
olleolleolle
suggested changes
Sep 3, 2020
There was a problem hiding this comment.
This PR fixes the issue – but has 1 typo.
Hello, I got interested in this PR, and tried it, in my app, and my test procedure was: "Start rails console and see if I still get that error warning message".
Error Warning that got me looking for a Rails 6 fix:
DEPRECATION WARNING: Single arity template handlers are deprecated. Template handlers must
now accept two parameters, the view object and the source for the view object.
Change:
>> JPbuilderHandler.call(template)
To:
>> JPbuilderHandler.call(template, source)
Update*: I made this as a Pull Request, so that I could try it out, using my Git repo in my Gemfile's gem directive.
pzupan#1
And, my rails console no longer warns.
DonSchado
added a commit
to juicer-io/jpbuilder
that referenced
this pull request
Oct 20, 2020
since the gem is unmaintained I borrowed the fix from: bigjason#13
This was referenced Oct 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.